﻿<?php
require_once "config.php";
require_once "db.class.php";

require_once "handler/actionHandler.php";

$params = array("host"=>"$host", "user"=>"$user", "pass"=>"$pass", "db"=>"$db");
$db = new Dbclass($params, false);
$userNames = array("小平", "小王", "小郜", "小佟");
$action = new ActionHandler($db, $tables);
for ($i = 0; $i < 100; $i++)
{
	$userName = $userNames[rand(0, 3)].$i;
	$action -> createUser($i + 1000,$userName);
	$sql = "insert into ".$tb_building_profile." (posX, posY, buildingIndex, sectionIndex, roofType, height, population, ownerId) values (7, 7, 0, 0, 0, 10, 150, ".($i+2).")";
	$db->query($sql);

}

$db->close();
echo "Finished!";
?>
